package com.packet.controller;

import com.packet.pojo.Member;
import com.packet.service.MemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;
import java.util.List;

/**
 * @ClassName:MemberController
 * @Author: mu
 * @Date:2024-06-24 17:12
 * @Describe:
 */
@Controller
public class MemberController {
    @Autowired
    private MemberService memberService;

    @RequestMapping("/staff/getAllMember/{Gid}")
    public String getAllMember(@PathVariable("Gid") Integer Gid,Model model, HttpSession session){
        List<Member> allMember = memberService.getAllMember(Gid);
        model.addAttribute("allMember",allMember);
        System.out.println(Gid);
        System.out.println(allMember);
        return "/staff/Trip/getMember";
    }
}
